home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 26
/
Cream of the Crop 26.iso
/
program
/
snpd9707.zip
/
SNIPKBIO.H
< prev
next >
Wrap
C/C++ Source or Header
|
1997-07-05
|
2KB
|
57 lines
.I 0 4
/* +++Date last modified: 05-Jul-1997 */
/*
** SNIPKBIO.H - Snippets header file for keyboard I/O function
.D 1 4
.I 17 31
int ungetkey(unsigned short key); /* Kb_Stuff.C */
int KB_stuff(char *str); /* Kb_Stuff.C */
int IsLeftShift(void); /* Isshift.C */
int IsRightShift(void); /* Isshift.C */
int IsShift(void); /* Isshift.C */
int IsLeftAlt(void); /* Isshift.C */
int IsRightAlt(void); /* Isshift.C */
int IsAlt(void); /* Isshift.C */
int IsLeftCtl(void); /* Isshift.C */
int IsRightCtl(void); /* Isshift.C */
int IsCtl(void); /* Isshift.C */
int IsSysRq(void); /* Isshift.C */
int timed_getch(int n_seconds); /* Timegetc.C */
int isxkeybrd(void); /* Isxkbrd.C */
void setcaps(void); /* Keylocks.C */
void clrcaps(void); /* Keylocks.C */
void setnumlock(void); /* Keylocks.C */
void clrnumlock(void); /* Keylocks.C */
#define RIGHT_SHIFT 0x0001
#define LEFT_SHIFT 0x0002
#define EITHER_ALT 0x0008
#define LEFT_ALT 0x0200
#define EITHER_CTL 0x0004
#define LEFT_CTL 0x0100
.D 18 28
.I 47 3
#define SYSRQ 0x8000
#else /* assume DOS */
#define SYSRQ 0x0400
.D 48 3
.I 64 1
** key is held, like DOS does. All the information about a keystroke is
.D 65 1
.I 73 7
extern KBDKEYINFO ki; /* Holds key info - defined in ISSHIFT.C */
#define peekkey() (&ki.fsState)
#else /* !__OS2__ */
#define key_seg 0x40
#define key_off 0x17
#define peekkey() ((unsigned short FAR*) MK_FP(key_seg, key_off))
.D 74 7